from flask.ext.migrate import Migrate, MigrateCommand
from flask.ext.script import Manager
from info import create_app, db, model

app = create_app("development")

# 集成终端启动程序命令，　记得在脚本处添加runserver
manager = Manager(app)

# 集成数据库迁移
Migrate(app, db)
manager.add_command('db', MigrateCommand)


if __name__ == '__main__':
    manager.run()